require 'erb'
require 'ostruct'

class ErbLoaderImpl < OpenStruct

    def resolveView(s, model)
        ErbLoaderImpl.new(model).render(s)
    end

    def render(s)
        ERB.new(File.read(s)).result(binding)
    end
end

ErbLoaderImpl.new